// This file was decompiled using SASCM.ini published by GTAG (http://gtag.gtagaming.com/opcode-database) on 14.6.2013
{$CLEO .CS}

//-------------MAIN---------------
thread 'SPN_5' 

$4754 = 100 

:SPN_5_19
wait 0 
if 
   Player.Defined($PLAYER_CHAR)
jf @SPN_5_19 
wait 5 
if 
   Actor.Driving($PLAYER_ACTOR)
jf @SPN_5_41 

:SPN_5_41
if 
   Actor.Driving($PLAYER_ACTOR)
jf @SPN_5_1A5 
$4755 = Actor.CurrentCar($PLAYER_ACTOR)
02E3: $4756 = car $4755 speed 
$4756 *= 2.34 
0092: $4756 = float $4756 to_integer 
04F7: status_text $4756 type 1 line 1 GXT 'CSPED' // global_variable 
02E3: $4757 = car $4755 speed 
$4757 *= 3.34 
0092: $4757 = float $4757 to_integer 
04F7: status_text $4757 type 0 line 2 GXT 'CSPED' // global_variable 
$4758 = Car.Health($4755)
0084: $4754 = $4758 // (int) 
if 
  $4754 > 250 
jf @SPN_5_E3 
$4754 -= 250 
$4754 /= 7 

:SPN_5_E3
04F7: status_text $4754 type 1 line 3 GXT 'CHAR' // global_variable 
0AB8: get_vehicle $4755 current_gear_to $4759 
04F7: status_text $4759 type 1 line 4 GXT 'FUEL' // global_variable 
if 
  $4759 == 0 
jf @SPN_5_128 
$4759 = 0 

:SPN_5_128
if 
  $4759 == 1 
jf @SPN_5_141 
$4759 = 20 

:SPN_5_141
if 
  $4759 == 2 
jf @SPN_5_15A 
$4759 = 40 

:SPN_5_15A
if 
  $4759 == 3 
jf @SPN_5_173 
$4759 = 60 

:SPN_5_173
if 
  $4759 == 4 
jf @SPN_5_18C 
$4759 = 80 

:SPN_5_18C
if 
  $4759 == 5 
jf @SPN_5_1A5 
$4759 = 100 

:SPN_5_1A5
0AF0: $4760 = get_int_from_ini_file "CLEO\POZIT.INI" section "SPED1" key "KEYT" 
if 
  $4760 == 1 
jf @SPN_5_1EF 
0151: remove_status_text $4756 
0151: remove_status_text $4754 
0151: remove_status_text $4759 
0151: remove_status_text $4757 
end_thread 

:SPN_5_1EF
if 
   not Actor.Driving($PLAYER_ACTOR)
jf @SPN_5_213 
0151: remove_status_text $4756 
0151: remove_status_text $4754 
0151: remove_status_text $4759 
0151: remove_status_text $4757 

:SPN_5_213
jf @SPN_5_19 
jump @SPN_5_19
